Documentation for class area

Inherits from 	basic_object 

Properties declared in area 

Class Methods declared in area 
	new(x, y, width, height) 

Methods declared in area 
	any 
		duplicate 
		height 
		rename(name) 
		set(x, y, width, height) 
		set_height(height) 
		set_width(width) 
		set_x(x) 
		set_y(y) 
		width 
		x 
		y 

Class 
#begin_class
area 
The class area is a sub-class of the class basic_object. 
An area consists of an origin and a size. The origin is defined by a (x, y) coordinate and specifies the lower left corner of the area. The size is the width and the height of the area.
The syntax of an area with the origin in (10, 20) and the width 40 and the height 50 would be:
{10 20 40 50}
#end_class

Properties 

Methods 

#begin_method
duplicate 
Returns a new area object that has the same origin and size as the receiving area object.
#end_method

#begin_method
height 
Returns the height of the area object.
Ex:
a := {10 20 40 50}
a:height
returns 50
#end_method

#begin_method
rename(name) 
Sets the name of the area object to the symbol name.
Ex:
a := {10 20 40 50}
a:rename(#my_area)
The area a can now also be referred to as
{area my_area}
and returns {10 20 40 50}
#end_method

#begin_method
set(x, y, width, height) 
Sets the origin and size of the area object.
Returns self.
Ex:
a := {10 20 40 50}
a:set(11, 21, 41, 51)
returns {11 21 41 51}
#end_method

#begin_method
set_height(height) 
Sets the height of the area object to height.
Returns self.
Ex:
a := {10 20 40 50}
a:set_height(100)
returns {10 20 40 100}
#end_method

#begin_method
set_width(width) 
Sets the width of the area object to width.
Returns self.
Ex:
a := {10 20 40 50}
a:set_width(100)
returns {10 20 100 50}
#end_method

#begin_method
set_x(x) 
Sets the x coordinate of the area object to x.
Returns self.
Ex:
a := {10 20 40 50}
a:set_x(100)
returns {100 20 40 50}
#end_method

#begin_method
set_y(y) 
Sets the y coordinate of the area object to y.
Returns self.
Ex:
a := {10 20 40 50}
a:set_y(100)
returns {10 100 40 50}
#end_method

#begin_method
width 
Returns the width of the area object.
Ex:
a := {10 20 40 50}
a:width
returns 40
#end_method

#begin_method
x 
Returns the x coordinate of the area object.
Ex:
a := {10 20 40 50}
a:x
returns 10
#end_method

#begin_method
y 
Returns the y coordinate of the area object.
Ex:
a := {10 20 40 50}
a:y
returns 20
#end_method

Class Methods 

#begin_class_method
new(x, y, width, height) 
Returns a new area object.
Ex:
{area}:new(10, 20, 30, 40)
returns {10 20 40 50}
#end_class_method